<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c"%>
<div title="维护假牌车信息" id="phoneyPlateVehicleSelectDialog" class="dialogtitle">
	<div class="searchbox">
		<span class="fontRed">注:</span>带"<span class="fontRed">*</span>"为必填项
		<form id="frmPhoneyPlateVehicle" onSubmit="return false">
		<input type="hidden" name="id" value="<c:out value='${phoneyPlateVehicle.id }'/>"/>
		<table id="phoneyPlateVehicleTable" cellspacing="0" cellpadding="0">
			<tr> 
				<td align="right" style="width: 114px;">号牌号码：<span class="fontRed">*</span></td>
				<td><input type="text" id="plateNum" name="plateNum" value="<c:out value='${phoneyPlateVehicle.plateNum}'/>"/></td>
				<td rowspan="7" style="width: 140px; height: 50px">
					<img src="http://t2.gstatic.com/images?q=tbn:ANd9GcQPVzYsWtUoKnZ4Gg9jFHticUh-YAPqN2KNprlXL0jsItLlZqvY" id="imageURL" width="250"  height="180" />
				</td>
			</tr>
			<tr>
				<td align="right" style="width: 114px;">号牌种类：<span class="fontRed">*</span></td>
				<td>
					<select id="plateTypeId" name="plateTypeId">
						<option value="">---请选择---</option>
						<c:forEach items="${lstLicencePlateKind}" var="plateType">
							<option value="${plateType.id}" ${plateType.id == phoneyPlateVehicle.plateTypeId ? "selected" : ""}><c:out value="${plateType.name}"/></option>
						</c:forEach>
					</select> 
				</td>
				<td></td>
			</tr>
			<tr>
				<td align="right" style="width: 114px;">号牌颜色：</td>
				<td>
					<select id=plateColorId name="plateColorId">
						<option value="">---请选择---</option>
						<c:forEach items="${lstPlateColor}" var="plateColor">
							<option value="${plateColor.id}" ${plateColor.id == phoneyPlateVehicle.plateColorId ? "selected" : ""}><c:out value="${plateColor.name}"/></option>
						</c:forEach>
					</select>
				</td>
				<td></td>
			</tr>
			<tr>
				<td align="right" style="width: 114px;">车辆类型：</td>
				<td>
					<select id="vehicleTypeId" name="vehicleTypeId">
						<option value="">---请选择---</option>
						<c:forEach items="${lstVehicleType}" var="vehicleType">
							<option value="${vehicleType.id }" ${vehicleType.id == phoneyPlateVehicle.vehicleTypeId ? "selected" : ""}><c:out value="${vehicleType.name}"></c:out></option>
						</c:forEach>
					</select>
				</td>
				<td></td>
			</tr>
			<tr style="width: 320px;">
				<td align="right" style="width: 114px;">车身颜色：</td>
				<td>
					<select id="vehicleColorId" name="vehicleColorId">
						<option value="">---请选择---</option>
						<c:forEach items="${lstVehicleColor}" var="vehicleColor">
							<option value="${vehicleColor.id }" ${vehicleColor.id == phoneyPlateVehicle.vehicleColorId ? "selected" : ""}><c:out value="${vehicleColor.name }"/></option>
						</c:forEach>
					</select>
				</td>
				<td></td>
			</tr>
			<tr>
				<td align="right" style="width: 114px;">使用性质：</td>
				<td>
					<select id="usingCharacterId" name="usingCharacterId">
						<option value="">---请选择---</option>
						<c:forEach items="${lstUseNature}" var="usingCharacter">
							<option value="${usingCharacter.id}" ${usingCharacter.id == phoneyPlateVehicle.usingCharacterId ? "selected" : ""}><c:out value="${usingCharacter.name}"></c:out></option>
						</c:forEach>
					</select>
				</td>
				<td></td>
			</tr>
			<tr>
				<td align="right" style="width: 114px;">车辆分类：</td>
				<td>
					<select id="vehicleClassificationId" name="vehicleClassificationId">
						<option value="">---请选择---</option>
						<c:forEach items="${lstVehicleClassification}" var="vehicleClassification">
							<option value="${vehicleClassification.id }" ${vehicleClassification.id == phoneyPlateVehicle.vehicleClassificationId ? "selected" : ""}><c:out value="${vehicleClassification.name}"></c:out></option>
						</c:forEach>
					</select>
				</td>
				<td></td>
			</tr>
			<tr style="width: 504px;">
				<td align="right" style="width: 114px;">车辆品牌：</td>
				<td><input type="text" id="vehicleBrand" name="vehicleBrand" value="<c:out value='${phoneyPlateVehicle.vehicleBrand}'/>"/></td>
				<td style="width: 230px;">
					<input type="file" name="fileField" id="fileField" style="width: 230px;" onchange="readURL(this);" />
				</td>
			</tr>
		</table>
		</form>
	</div>
</div>
<div id="">
	<span class="fontRed">提示：</span>1.图片大小不能大于1M<br>
		2.图片格式为：jpg、jpeg、gif、png、bmp
</div>
<div id="infoPhoneyPlateVehiclet" class="fontRed"></div>
<script>
	$("#button").button();
	function readURL(input) {
		if (input.files && input.files[0]) {
			var reader = new FileReader();
			reader.onload = function (e) {
				$('#imageURL').attr('src', e.target.result).width(250).height(180);
			};
			reader.readAsDataURL(input.files[0]);
		}
	}
</script>
